<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<%@include file="/WEB-INF/pages/common/common.jsp"%>
<title>用户列表</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

.STYLE1 {
	font-size: 12px
}

.STYLE4 {
	font-size: 12px;
	color: #1F4A65;
	font-weight: bold;
}

a:link {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;
}

a:visited {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;
}

a:hover {
	font-size: 12px;
	color: #FF0000;
	text-decoration: underline;
}

a:active {
	font-size: 12px;
	color: #FF0000;
	text-decoration: none;
}

.STYLE7 {
	font-size: 12
}
-->
</style>
</head>
<script type="text/javascript">
	$(function(){
		$("#checkall").click(function(){
			if(this.checked){
				$("input[name='objId']").each(function(){this.checked=true});
			}else{
				$("input[name='objId']").each(function(){this.checked=false});
			}
		});
		$("#delete").click(function(){
			if(!confirm('删除将无法恢复,确定要删除吗？')){
				return ;
			}
			var check = $("input[name='objId']:checked");
			var value= "";
			check.each(function(i){        //循环拼装被选中项的值
				value +=','+$(this).val();
			   });
			window.location="${ctx}user/delete.htm?page.pageNo=${page.pageNo}&ids="+value;
		});
		
		
		
		if("${operate}"==1){
			alert("操作成功！");
		}
	});
	
</script>
<body>
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
		<form id="mainForm" action="${ctx}user/list.htm" method="post">
			<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
			<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
			<tr>
				<td height="30">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="15" height="30">
								<img src="${ctx}resources/images/page/tab_03.gif" width="15" height="30" />
							</td>
							<td width="1101" background="${ctx}resources/images/page/tab_05.gif">
								<img src="${ctx}resources/images/page/311.gif" width="16" height="16" />
								<span class="STYLE4">用户列表</span>
							</td>
							<td width="281" background="${ctx}resources/images/page/tab_05.gif">
						        <table border="0" align="right" cellpadding="0" cellspacing="0">
									<tr>
										<td width="60">
											<table width="87%" border="0" cellpadding="0" cellspacing="0">
												<tr>
													<td class="STYLE1"><div align="center">
															<input id="checkall" type="checkbox" name="checkbox62" value="checkbox" />
														</div>
													</td>
													<td class="STYLE1">
														<div align="center">全选</div>
													</td>
												</tr>
											</table>
										</td>
										<pm:verify authority="user_add">
										<td width="60"><table width="90%" border="0" cellpadding="0" cellspacing="0">
												<tr style="cursor: pointer;">
													<td class="STYLE1">
														<div align="center">
															<img src="${ctx}resources/images/page/001.gif" width="14" height="14" />
														</div>
													</td>
													<td class="STYLE1"><div align="center"><a href="${ctx}user/input.htm">新增</a></div>
													</td>
												</tr>
											</table>
											
										</td>
										</pm:verify>
										<pm:verify authority="user_modify">
											<td width="60"><table width="90%" border="0" cellpadding="0" cellspacing="0">
													<tr style="cursor: pointer;">
														<td class="STYLE1">
															<div align="center">
																<img src="${ctx}resources/images/page/114.gif" width="14" height="14" />
															</div>
														</td>
														<td class="STYLE1"><div align="center"><a href="${ctx}user/input.htm">修改</a></div>
														</td>
													</tr>
												</table>
											</td>
										</pm:verify>
										<pm:verify authority="user_delete">
										<td width="52"><table width="88%" border="0" cellpadding="0" cellspacing="0">
												<tr id="delete" style="cursor: pointer;">
													<td class="STYLE1"><div align="center">
															<img src="${ctx}resources/images/page/083.gif" width="14" height="14" />
														</div>
													</td>
													<td class="STYLE1"><div align="center">删除</div>
													</td>
												</tr>
											</table>
										</td>
										</pm:verify>
									</tr>
								</table>
							</td>
							<td width="14">
								<img src="${ctx}resources/images/page/tab_07.gif" width="14" height="30" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="9" background="${ctx}resources/images/page/tab_12.gif">&nbsp;</td>
							<td bgcolor="#f3ffe3">
								<table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#c0de98">
									<tr background="${ctx}resources/images/page/tab_14.gif">
										<td class="STYLE1" colspan="12" height="30px">
										    <span style="padding-left: 40px;">姓名:<input type="text" name="filter_LIKES_realName" value="${param['filter_LIKES_realName']}">
											</span> <span style="padding-left: 20px">登陆名:<input type="text" name="filter_LIKES_loginName" value="${param['filter_LIKES_loginName']}">
											</span> <span style="padding-left: 20px"><input type="button" name="" onclick="search();" value="查询"> </span>
										</td>
									</tr>
									<tr>
										<td width="5%" height="26" background="${ctx}resources/images/page/tab_14.gif" class="STYLE1">
											<div align="center" class="STYLE2 STYLE1">选择</div>
										</td>
										<td width="5%" height="18" background="${ctx}resources/images/page/tab_14.gif" class="STYLE1">
											<div align="center" class="STYLE2 STYLE1" onclick="sort('id','desc')" style="cursor: pointer;">ID</div>
										</td>
										<td width="9%" height="18" background="${ctx}resources/images/page/tab_14.gif" class="STYLE1">
											<div align="center" class="STYLE2 STYLE1" onclick="sort('realName','desc')" style="cursor: pointer;">姓 名</div>
										</td>
										<td width="4%" height="18" background="${ctx}resources/images/page/tab_14.gif" class="STYLE1">
											<div align="center" class="STYLE2 STYLE1" onclick="sort('loginName','desc')" style="cursor: pointer;">用户名</div>
										</td>
										<td width="4%" height="18" background="${ctx}resources/images/page/tab_14.gif" class="STYLE1">
											<div align="center" class="STYLE2 STYLE1">性别</div>
										</td>
										<td width="7%" height="18" background="${ctx}resources/images/page/tab_14.gif" class="STYLE1">
											<div align="center" class="STYLE2">生日</div>
										</td>
										<td width="10%" height="18" background="${ctx}resources/images/page/tab_14.gif" class="STYLE1">
											<div align="center" class="STYLE2 STYLE1">手机</div>
										</td>
										<td width="10%" height="18" background="${ctx}resources/images/page/tab_14.gif" class="STYLE1">
											<div align="center" class="STYLE2 STYLE1">固定电话</div>
										</td>
										<td width="10%" height="18" background="${ctx}resources/images/page/tab_14.gif" class="STYLE1">
											<div align="center" class="STYLE2" onclick="sort('email','desc')" style="cursor: pointer;">电子邮件</div>
										</td>
										<td width="18%" height="18" background="${ctx}resources/images/page/tab_14.gif" class="STYLE1">
										<div align="center" class="STYLE2">住址</div>
										<td width="5%" height="18" background="${ctx}resources/images/page/tab_14.gif" class="STYLE1">
										<div align="center" class="STYLE2">状态</div>
										</td>
										<td width="13%" height="18" background="${ctx}resources/images/page/tab_14.gif" class="STYLE1">
											<div align="center" class="STYLE2">操作</div>
										</td>
									</tr>
									<c:forEach items="${page.result}" var="user">
										<tr onmouseover="" onmouseout="">
											<td height="18" bgcolor="#FFFFFF">
												<div align="center" class="STYLE1">
													<input name="objId" type="checkbox" class="STYLE2" value="${user.id}" />
												</div>
											</td>
											<td height="18" bgcolor="#FFFFFF" class="STYLE2">
												<div align="center" class="STYLE2 STYLE1">${user.id}</div>
											</td>
											<td height="18" bgcolor="#FFFFFF">
												<div align="center" class="STYLE2 STYLE1">${user.realName}</div>
											</td>
											<td height="18" bgcolor="#FFFFFF">
												<div align="center" class="STYLE2 STYLE1">${user.loginName}</div>
											</td>
											<td height="18" bgcolor="#FFFFFF">
												<div align="center" class="STYLE2 STYLE1">${user.sex=="1"?"女":"男"}</div>
											</td>
											<td height="18" bgcolor="#FFFFFF">
												<div align="center" class="STYLE2 STYLE1"><fmt:formatDate value="${user.bithday}" pattern= "yyyy-MM-dd"/></div>
											</td>
											<td height="18" bgcolor="#FFFFFF">
												<div align="center" class="STYLE2 STYLE1">${user.mobile}</div>
											</td>
											<td height="18" bgcolor="#FFFFFF">
												<div align="center" class="STYLE2 STYLE1">${user.phone}</div>
											</td>
											<td height="18" bgcolor="#FFFFFF">
												<div align="center" class="STYLE2 STYLE1">${user.email}</div>
											</td>
											<td height="18" bgcolor="#FFFFFF">
												<div align="center" class="STYLE2 STYLE1">${user.addr}</div>
											</td>
											<td height="18" bgcolor="#FFFFFF">
												<div align="center" class="STYLE2 STYLE1">${user.status=="0"?"正常":"无效"}</div>
											</td>
											<td height="18" bgcolor="#FFFFFF">
												<div align="center"> 
													<pm:verify authority="user_modify">
														<span class="STYLE2">
															 <img src="${ctx}resources/images/page/037.gif" width="9" height="9" />
														</span> 
														<span class="STYLE1"> [</span>
														<a href="#">编辑</a>
														<span class="STYLE1">]</span> 
													</pm:verify>
													<pm:verify authority="user_delete">
														<span class="STYLE2">
															 <img src="${ctx}resources/images/page/010.gif" width="9" height="9" /> 
														</span> 
														<span class="STYLE1">[</span>
														<a href="${ctx}user/delete.htm?page.pageNo=${page.pageNo}&ids=${user.id}" onclick="return confirm('删除将无法恢复,确定要删除吗？')">删除</a>
														<span class="STYLE1">]</span>
													</pm:verify>
												</div>
											</td>
										</tr>
									</c:forEach>
								</table>
							</td>
							<td width="9" background="${ctx}resources/images/page/tab_16.gif">&nbsp;</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td height="29"><table width="100%" border="0" cellspacing="0"
						cellpadding="0">
						<tr>
							<td width="15" height="29">
								<img src="${ctx}resources/images/page/tab_20.gif" width="15" height="29" />
							</td>
							<td background="${ctx}resources/images/page/tab_21.gif">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="25%" height="29" nowrap="nowrap">
											<span class="STYLE1">共${page.totalCount}条纪录，当前第${page.pageNo}/${page.totalPages}页，每页
												<select name="page.pageSize" id="pageSize" onchange="changePageSize()">
													<option value="20" ${page.pageSize==20?"selected":""}>${page.pageSize}</option>
													<option value="40" ${page.pageSize==40?"selected":""}>40</option>
													<option value="60" ${page.pageSize==60?"selected":""}>60</option>
													<option value="80" ${page.pageSize==80?"selected":""}>80</option>
											</select> 条纪录 </span></td>
										<td width="75%" valign="top" class="STYLE1">
											<div align="right">
												<table  height="20" border="0" cellpadding="0" cellspacing="0">
													<tr>
														<td width="62" height="22" valign="middle">
															<div align="right">
																<img src="${ctx}resources/images/page/first.gif" width="37" height="15" style="cursor: pointer;" onclick="jumpPage(1)"/>
															</div>
														</td>
														<c:if test="${page.hasPre}">
															<td width="50" height="22" valign="middle">
																<div align="right">
																	<img src="${ctx}resources/images/page/back.gif" width="43" height="15" style="cursor: pointer;"  onclick="jumpPage(${page.prePage})"/>
																</div>
															</td>
														</c:if>
														<c:if test="${page.hasNext}">
															<td width="54" height="22" valign="middle">
																<div align="right">
																	<img src="${ctx}resources/images/page/next.gif" width="43" height="15" style="cursor: pointer;" onclick="jumpPage(${page.nextPage})"/>
																</div>
															</td>
														</c:if>
														<td width="49" height="22" valign="middle">
															<div align="right">
																<img src="${ctx}resources/images/page/last.gif" width="37" height="15" style="cursor: pointer;" onclick="jumpPage(${page.totalPages})"/>
															</div>
														</td>
														<td width="59" height="22" valign="middle">
															<div align="right" class="STYLE1">转到第</div>
														</td>
														<td width="25" height="22" valign="middle">
															<span class="STYLE7">
																 <input name="pageNo" id="pageNo1" type="text" class="STYLE1" style="height: 15px; width: 25px;" size="5" />
															</span>
														</td>
														<td width="23" height="22" valign="middle" class="STYLE1">页</td>
														<td width="30" height="22" valign="middle">
															<img src="${ctx}resources/images/page/go.gif" width="37" height="15" style="cursor: pointer;" onclick="jumpPage(${page.totalPages})"/>
														</td>
													</tr>
												</table>
											</div>
										</td>
									</tr>
								</table>
							</td>
							<td width="14"><img src="${ctx}resources/images/page/tab_22.gif" width="14" height="29" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</form>
	</table>
</body>
</html>

